<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>WIKINDX CLASS DOCUMENTATION</title>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="/wikindx2/docs/docs.css" type="text/css" />
</head>

<body bgcolor="#FFFFFF" text="#000000">
<h2>WIKINDX METHODS</h2>
<p><strong>Method:</strong><br />
  
  updateSingle()
</p>
<p><strong>Class:</strong><br />

  <a href="sqlClass.html">SQL</a>
<p><strong>Method Call:</strong><br />
  include_once("core/sql/SQL.php");<br />
$db = new SQL();<br />
$db->updateSingle(STRING: $table, STRING: $setString, [STRING: $condition]); </p>
<p><strong>Description:</strong><br />
Execute an UPDATE statement.</p>
<p> $setString is a string such as &quot;field=value&quot; that has been suitably formatted with <a href="formatfieldMethod.html">formatField()</a> and <a href="tidyinputMethod.html">tidyInput()</a> methods. Unlike <a href="updateMethod.html">update()</a>, updateSingle() is intended for quickly updating just one field in a database table. </p>
<p><strong>Usage:<br />
</strong>For example (assuming the database object exists within a class as $this->db):
<pre>
	$subTitle = "Beginner's Guide";
	$table = "WKX_resource";
	$setString = $this->db->formatField('subtitle') ."=" . $this->db->tidyInput($subTitle);
	$condition = "WHERE " . $this->db->formatField('id') . "=" . $this->db->tidyInput(666);
	$this->db->updateSingle($table, $setString, $condition);</p>

</pre><p align="right"><a href="../../index.html">WIKINDX home</a>
&nbsp;&nbsp;&nbsp;&nbsp;
<a href="../../usage/index.html">WIKINDX usage</a>
&nbsp;&nbsp;&nbsp;&nbsp;
<a href="../index.html">WIKINDX classes</a>
</p>
</body>

</html>
